package com.secxiot.provider.task.dao;

import com.secxiot.provider.task.entity.TaskFile;
import com.secxiot.provider.task.entity.TaskFileExample;
import com.secxiot.provider.task.vo.TaskFileVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface TaskFileDao {
    long countByExample(TaskFileExample example);

    int deleteByExample(TaskFileExample example);

    int deleteByPrimaryKey(Long id);

    int insert(TaskFile record);

    int insertSelective(TaskFile record);

    List<TaskFile> selectByExample(TaskFileExample example);

    TaskFile selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") TaskFile record, @Param("example") TaskFileExample example);

    int updateByExample(@Param("record") TaskFile record, @Param("example") TaskFileExample example);

    int updateByPrimaryKeySelective(TaskFile record);

    int updateByPrimaryKey(TaskFile record);

    int insertBatch(@Param("records") List<TaskFile> records);

    //查询每个任务所有得附件
    List<TaskFile> selectByTaskId(Long taskId);

    /**
     * 获取任务附件
     * @param taskId 任务ID
     * @return
     */
    List<TaskFileVo> getListByTaskId(Long taskId);

    /**
     *  获取交接任务附件
     * @param taskId 任务ID
     * @param transferId 交接任务ID
     * @return
     */
    List<TaskFileVo> getTransferFileList(Long taskId,Long transferId);

}